<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>网站管理系统</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" href="../Files/Css/login.css" type="text/css" />
    <link href="../Files/Css/formpost.css" rel="stylesheet" charset="utf-8" type="text/css" />
    <script type="text/javascript" src="../Files/Javascript/jquery.js"></script>
    <script type="text/javascript">
    //<![CDATA[
    $(function(){
            //����Ǳ���ģ���Ӻ��Ǳ�ʶ.
            $("form :input.required").each(function(){
                var $required = $("<strong class='high'> *</strong>"); //����Ԫ��
                $(this).parent().append($required); //Ȼ����׷�ӵ��ĵ���
            });
             //�ı���ʧȥ�����
            $('form :input').blur(function(){
                 var $parent = $(this).parent();
                 $parent.find(".formtips").remove();
                 //��֤�û���
                 if( $(this).is('#username') ){
                        if( this.value=="" ){
                            var errorMsg = 'NOT NULL';
                            $parent.append('<span class="formtips onError">'+errorMsg+'</span>');
                        }else{
                            var okMsg = 'OK';
                            $parent.append('<span class="formtips onSuccess">'+okMsg+'</span>');
                        }
                 }
                 //��֤����
                 if( $(this).is('#password') ){
                    if( this.value=="" ){
                          var errorMsg = 'NOT NULL';
                          $parent.append('<span class="formtips onError">'+errorMsg+'</span>');
                    }else{
                          var okMsg = 'OK';
                          $parent.append('<span class="formtips onSuccess">'+okMsg+'</span>');
                    }
                 }
                 
            }).keyup(function(){
               $(this).triggerHandler("blur");
            }).focus(function(){
                 $(this).triggerHandler("blur");
            });//end blur

            
            //�ύ��������֤��
             $('#dosubmit').click(function(){
                    $("form :input.required").trigger('blur');
                    var numError = $('form .onError').length;
                    if(numError){
                        return false;
                    }
             });

            //����
             $('#doreset').click(function(){
                    $(".formtips").remove();
             });
    })
    //]]>
    </script>
</head>
<body>
    <div id="main" align="center">
        <form id="form1" method="post" action="login.server.php">
        <div id="login_box">
        <ul>
        <li>
                <table style="width:300px;height:100%;" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="50" height="27">
                           用户名:
                        </td>
                        <td colspan="2">
                            <input id="username" name="username" type="text" class="required" size="22" />
                        </td>
                    </tr>
                    <tr>
                        <td height="27">
                            密&nbsp;&nbsp;码:&nbsp;
                        </td>
                        <td colspan="2">
                            <input id="password" name="password" type="password" class="required" size="22" />
                        </td>
                    </tr>
                    <tr>
                        <td height="27">
                            &nbsp;
                        </td>
                        <td colspan="2" valign="bottom">
                            <input id="dosubmit" type="submit" name="dosubmit" value="登录" class="btn" />
                            &nbsp;&nbsp;&nbsp;
                            <input id="doreset" type="reset" name="doreset" value="清除" class="btn" />
                        </td>
                    </tr>
                    <tr>
                        <td height="80">
                        </td>
                    </tr>
                </table>
                </li>
                </ul>
        </div>
        </form>
    </div>
</body>
</html>